package com.simple.util;

import java.util.ArrayList;
import java.util.List;

import com.simple.util.object.JFValidationBean;

public class ErrorMessageUtil {
	private static final ThreadLocal<List<JFValidationBean>> threadSession = new ThreadLocal<List<JFValidationBean>>();
	
	public static List<JFValidationBean> getErrorList(){
    	List<JFValidationBean> errorList = (List<JFValidationBean>) threadSession.get();  
    	
    	if (errorList == null) {  
    		errorList = new ArrayList<JFValidationBean>();  
    		threadSession.set(errorList);  
    	}  

    	return errorList;
    }
	
	
	public static void remove(){
		threadSession.remove();
	}

}
